#include<bits/stdc++.h>
using namespace std;
namespace my_std{
	#define ll long long
	#define bl bool
	ll my_pow(ll a,ll b,ll mod){
		ll res=1;
		if(!b) return 1;
		while(b){
			if(b&1) res=(res*a)%mod;
			a=(a*a)%mod;
			b>>=1;
		}
		return res;
	}
	ll qpow(ll a,ll b){
		ll res=1;
		if(!b) return 1;
		while(b){
			if(b&1) res*=a;
			a*=a;
			b>>=1;
		}
		return res;
	}
	#define db double
	#define pf printf
	#define pc putchar
	#define fr(i,x,y) for(register ll i=(x);i<=(y);i++)
	#define pfr(i,x,y) for(register ll i=(x);i>=(y);i--)
	#define go(u) for(ll i=head[u];i;i=e[i].nxt)
	#define enter pc('\n')
	#define space pc(' ')
	#define fir first
	#define sec second
	#define MP make_pair
	#define il inline
	#define inf 8e18
	#define random(x) rand()*rand()%(x)
	#define inv(a,mod) my_pow((a),(mod-2),(mod))
	il ll read(){
		ll sum=0,f=1;
		char ch=0;
		while(!isdigit(ch)){
			if(ch=='-') f=-1;
			ch=getchar();
		}
		while(isdigit(ch)){
			sum=sum*10+(ch^48);
			ch=getchar();
		}
		return sum*f;
	}
	il void write(ll x){
		if(x<0){
			x=-x;
			pc('-');
		}
		if(x>9) write(x/10);
		pc(x%10+'0');
	}
	il void writeln(ll x){
		write(x);
		enter;
	}
	il void writesp(ll x){
		write(x);
		space;
	}
}
using namespace my_std;
ll n,m,q,d[100010],head[100010],cnt=0;
struct edge{
	ll nxt,to;
}e[200020];
struct node{
	ll x,y,p;
}p[100010];
void add(ll u,ll v){
	e[++cnt].nxt=head[u];
	e[cnt].to=v;
	head[u]=cnt;
}
struct sub1{
	bitset<1010> f[1010];
	vector<ll> vec[1010],vecc[1010];
	ll dep[1010],minn[1010][10],lg[1010],dfn[1010],st[1010],tot=0;
	ll low[1010],blg[1010],cntt=0,sta[1010],top=0;
	bl ck[1010],pd[1010];
	void dfs(ll fa,ll u){
		dep[u]=dep[fa]+1;
		dfn[++tot]=u;
		st[u]=tot;
		go(u){
			ll v=e[i].to;
			if(v==fa) continue;
			dfs(u,v);
		}
	}
	il ll dis(ll x,ll y){
		if(x==y) return 0;
		if(st[x]>st[y]) swap(x,y);
		ll l=st[x]+1,r=st[y],tmp=lg[r-l+1];
		return dep[x]+dep[y]-2*(min(minn[l][tmp],minn[r-(1ll<<tmp)+1][tmp])-1);
	}
	void tarjan(ll u){
		dfn[u]=low[u]=++tot;
		sta[++top]=u;
		ck[u]=1;
		fr(i,0,(ll)vec[u].size()-1){
			ll v=vec[u][i];
			if(!dfn[v]){
				tarjan(v);
				low[u]=min(low[u],low[v]);
			}
			else if(ck[v]) low[u]=min(low[u],dfn[v]);
		}
		if(dfn[u]==low[u]){
			blg[u]=++cntt;
			ck[u]=0;
			while(sta[top]!=u){
				blg[sta[top]]=cntt;
				ck[sta[top]]=0;
				top--;
			}
			top--;
		}
	}
	void dfs2(ll u){
		pd[u]=1;
		fr(i,0,(ll)vecc[u].size()-1){
			ll v=vecc[u][i];
			if(!pd[v]) dfs2(v);
			f[u]|=f[v];
		}
	}
	il void solve(){
		dfs(0,1);
		fr(i,1,n) minn[i][0]=dep[dfn[i]];
		fr(j,1,9) fr(i,1,n-(1ll<<j)+1) minn[i][j]=min(minn[i][j-1],minn[i+(1ll<<(j-1))][j-1]);
		fr(i,2,n) lg[i]=lg[i>>1]+1;
		fr(i,1,n) fr(j,1,n) if(dis(i,j)<=d[i]) vec[i].push_back(j);
		fr(i,1,n) dfn[i]=0;
		tot=0;
		fr(i,1,n) if(!dfn[i]) tarjan(i);
		fr(i,1,n) f[blg[i]][i]=1;
		fr(i,1,n){
			fr(j,0,(ll)vec[i].size()-1){
				ll v=vec[i][j];
				if(blg[i]!=blg[v]) vecc[blg[i]].push_back(blg[v]);
			}
		}
		fr(i,1,cntt) dfs2(i);
		fr(i,1,q){
			bl ans=0;
			fr(j,1,n){
				if(dis(p[i].x,j)<=p[i].p&&f[blg[j]][p[i].y]){
					ans=1;
					break;
				}
			}
			if(ans) pf("YES\n");
			else pf("NO\n");
		}
	}
}sub1;
il bl cmp(ll x,ll y){
	return d[x]<d[y];
}
struct sub2{
	ll L[100010],R[100010],lg[100010],minn[100010][17],maxx[100010][17];
	il ll querymin(ll l,ll r){
		ll tmp=lg[r-l+1];
		return min(minn[l][tmp],minn[r-(1ll<<tmp)+1][tmp]);
	}
	il ll querymax(ll l,ll r){
		ll tmp=lg[r-l+1];
		return max(maxx[l][tmp],maxx[r-(1ll<<tmp)+1][tmp]);
	}
	il void solve(){
		fr(i,1,n){
			L[i]=max(1ll,i-d[i]);
			R[i]=min(n,i+d[i]);
		}
		fr(i,2,n) lg[i]=lg[i>>1]+1;
		fr(_,1,17){
			fr(i,1,n) minn[i][0]=L[i];
			fr(j,1,16) fr(i,1,n-(1ll<<j)+1) minn[i][j]=min(minn[i][j-1],minn[i+(1ll<<(j-1))][j-1]);
			fr(i,1,n) maxx[i][0]=R[i];
			fr(j,1,16) fr(i,1,n-(1ll<<j)+1) maxx[i][j]=max(maxx[i][j-1],maxx[i+(1ll<<(j-1))][j-1]);
			fr(i,1,n){
				L[i]=querymin(L[i],R[i]);
				R[i]=querymax(L[i],R[i]);
			}
		}
		fr(i,1,n) minn[i][0]=L[i];
		fr(j,1,16) fr(i,1,n-(1ll<<j)+1) minn[i][j]=min(minn[i][j-1],minn[i+(1ll<<(j-1))][j-1]);
		fr(i,1,n) maxx[i][0]=R[i];
		fr(j,1,16) fr(i,1,n-(1ll<<j)+1) maxx[i][j]=max(maxx[i][j-1],maxx[i+(1ll<<(j-1))][j-1]);
		fr(i,1,q){
			ll nl=max(1ll,p[i].x-p[i].p),nr=min(n,p[i].x+p[i].p);
			if(querymin(nl,nr)<=p[i].y&&p[i].y<=querymax(nl,nr)) pf("YES\n");
			else pf("NO\n");
		}
	}
}sub2;
int main(){
	freopen("shu.in","r",stdin);
	freopen("shu.out","w",stdout);
	n=read();
	m=read();
	q=read();
	bl ck2=1;
	fr(i,2,n){
		ll u=read(),v=read();
		add(u,v);
		add(v,u);
		if(abs(u-v)!=1) ck2=0;
	}
	fr(i,1,q){
		p[i].x=read();
		p[i].y=read();
		p[i].p=read();
	}
	fr(i,1,m){
		ll x=read();
		d[x]=max(d[x],read());
	}
	if(n<=1000&&m<=1000&&q<=1000){
		sub1.solve();
		return 0;
	}
	if(ck2){
		sub2.solve();
		return 0;
	}
}
